<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:fragment="head">
    <meta charset="UTF-8">
    <title>Title</title>
    <script th:src="@{/static/js/jq.js}"></script>
    <style>
        .body{
            position: fixed;
            top: 0;
            height: 50px;
            width: 100%;
            border-bottom: 1px solid #efefef;
        }
        .head-content{
            position: absolute;
            right: 50px;
            display: flex;
            line-height: 50px;
        }

        .admin-name{
            margin-right: 30px;
        }

        .logout{
        }

    </style>
</head>
<body>
    <div class="body">
        <div class="head-content">
            <div class="admin-name" th:if="${session.admin}" th:text="${session.admin.name}">姓名</div>
            <div class="logout" onclick="logout()">退出登陆</div>
        </div>
    </div>
</body>
<script>
    // 退出登陆
    function logout(){
        // 跳转到退出登陆接口
        window.location = "/mall/admin/login/logout";
    }
</script>
</html>